package spec.tianjunxiu.unit4.task4_3.jiekou;

public class PrintMessage implements/*实现，执行*/ IprintMessage {
    int i=0;
    String[] message;

    public PrintMessage() {
        message =new String[3];
        putMessage("Hello World");
        putMessage("Hello China");
        putMessage("Hello JiangYou");
    }


    void  putMessage(String str){
        message[i++]=str;
    }

    @Override
    public void printAllMessage() {
        for(int j=0;j<message.length;j++){

        }
    }

    @Override
    public void printLastAllMessage() {
        System.out.println(message[message.length-1]);
    }

    @Override
    public void printFristAllMessage() {
        System.out.println(message[0]);
    }
}
